﻿@{
    Layout = null;
    string CurrentLoginId = base.ViewBag.LoginId;
    string CurrentRealName = base.ViewBag.RealName;
}

<!DOCTYPE html>
<html>
<head>
    <meta name="viewport" content="width=device-width" />
    <title>统一身份认证 - 后台首页</title>
    <link type="text/css" href="~/Content/css/Home/Index.css" rel="stylesheet" />
    <link type="text/css" href="~/Content/themes/default/easyui.css" rel="stylesheet" />
    <link type="text/css" href="~/Content/themes/color.css" rel="stylesheet" />
    <link type="text/css" href="~/Content/themes/icon.css" rel="stylesheet" />
    <script type="text/javascript" src="~/Scripts/jquery-1.12.4.min.js"></script>
    <script type="text/javascript" src="~/Scripts/jquery.easyui-1.4.5.min.js"></script>
    <script type="text/javascript" src="~/Scripts/locale/easyui-lang-zh_CN.js"></script>
    <script type="text/javascript" src="~/Scripts/jquery.unobtrusive-ajax.min.js"></script>
    <script type="text/javascript" src="~/Scripts/jquery.validate.min.js"></script>
    <script type="text/javascript" src="~/Scripts/jquery.validate.unobtrusive.min.js"></script>
    <script type="text/javascript" src="~/Scripts/jquery.extensions.js"></script>
    <script type="text/javascript" src="~/Scripts/jquery.extensions.message.js"></script>
    <script type="text/javascript" src="~/Scripts/jquery.easyui.extensions.js"></script>
    <script type="text/javascript" src="~/Scripts/datetools.js"></script>
    <script type="text/javascript" src="~/Content/scripts/Home/Index.js"></script>
</head>
<body class="easyui-layout">
    @*网站头部*@
    <div data-options="region:'north',split:false,border:false" id="dvHeader">
        @*左侧logo*@
        <div class="logo">统一身份认证后台管理</div>
        @*右侧内容*@
        <div class="rightBtns">
            @*注销用户、修改密码按钮*@
            <a class="easyui-linkbutton" data-options="iconCls: 'icon-cancel',plain:true" id="btn_exit" onclick="logout();">注销用户</a>
            <a class="easyui-linkbutton" data-options="iconCls: 'icon-lock',plain:true" id="btn_padlock" onclick="openChangePassword();">修改密码</a>
            <div class="welcomeLb">
                <span>欢迎您：@CurrentRealName</span>
            </div>
        </div>
    </div>

    @*网站中部，内容部分*@
    <div data-options="region:'center'" id="dvContent">
        <div class="easyui-tabs" id="tabs" data-options="headerWidth:200,fit:true">
            <div data-options="title:'首页'" class="tabHome">
                <iframe src="http://cn.bing.com" style="width: 100%; height: 99%; border: 0;"></iframe>
            </div>
        </div>
    </div>

    @*网站左部，菜单部分*@
    <div data-options="region:'west',split:false" title="功能选项" id="dvMenu">
        <ul id="menuTree"></ul>
    </div>

    @*网站底部*@
    <div data-options="region:'south',border:false" id="dvFooter">
        <div class="currentUser">当前登录用户：<span id="spLoginId">@CurrentLoginId</span></div>
        <div class="service">
            <span>开发及技术支持&nbsp;——&nbsp;</span><a href="http://git.oschina.net/lishilei0523" target="_blank">SlamDunk co.,ltd.</a>&nbsp;&nbsp;<span id="nowDate"></span>
        </div>
    </div>

    @*修改密码对话框*@
    <div id="dvUpdatePwd" class="easyui-window" title="修改密码" style="padding: 5px;" data-options="width:360,height:230,maximizable: false,resizable: false,draggable: false,modal: true,minimizable: false,collapsible: false,closed: true,footer: '#footer'">
        @using (Ajax.BeginForm("UpdatePassword",
        new
        {
            controller = "User"
        },
        new AjaxOptions
        {
            HttpMethod = "post",
            OnBegin = "updatingPassword",
            OnSuccess = "updateSucceed",
            OnFailure = "updateFailed"
        },
        new
        {
            id = "fmUpdatePwd"
        }))
        {
            @*隐藏域，携带LoginId*@
            <input type="hidden" name="loginId" id="hdLoginId" />
            <table style="margin: 10px auto;">
                <tr>
                    <td>旧密码:</td>
                    <td>
                        <input class="easyui-textbox" type="password" id="oldPassword" name="oldPassword" data-options="required:true,iconCls:'icon-lock',width:210" />
                    </td>
                </tr>
                <tr>
                    <td>新密码:</td>
                    <td>
                        <input class="easyui-textbox" type="password" id="newPassword" name="newPassword" data-options="required:true,iconCls:'icon-lock',width:210" />
                    </td>

                </tr>
                <tr>
                    <td>确认密码:</td>
                    <td>
                        <input class="easyui-textbox" type="password" id="confirmPassword" name="confirmPassword" data-options="required:true,iconCls:'icon-lock',width:210" />
                    </td>
                </tr>
            </table>
            <div id="footer" style="padding: 5px;">
                <div style="float: right;">
                    <a class="easyui-linkbutton c6" data-options="iconCls:'icon-ok'" onclick="changePassword();" style="width: 90px">保存</a>
                    <a class="easyui-linkbutton" data-options="iconCls:'icon-reload'" onclick="javascript: $('#fmUpdatePwd').form('reset');" style="width: 90px">重置</a>
                    <a class="easyui-linkbutton" data-options="iconCls:'icon-cancel'" onclick="javascript: $('#dvUpdatePwd').window('close');" style="width: 90px">取消</a>
                </div>
            </div>
        }
    </div>

    @*公共窗口*@
    <div id="commonWindow">
        <iframe style="width: 100%; height: 98%; border: 0;"></iframe>
    </div>
</body>
</html>
